<script>
/* no programming needed but oh well! */
var sum = 0;
for(var i = 1, e = 1000; i < e; i++) {
	if(i%3===0 || i%5===0) {
		sum += i;
	}
}
document.write(sum);
</script>